From: Colin Walters Date: Wed, 30 Apr 2025 01:16:33 +0000 (-0400) Subject: tests/prune: Minor refactor and logging X-Git-Tag: archive/raspbian/2025.7-2+rpi1^2^2~6^2~4^2~36^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=320cd9f8f9a7c3171cbf53c2e0dfbb1f23679545;p=ostree.git tests/prune: Minor refactor and logging - Add a shared modules_dir variable to avoid repetition - Log size of kernel+initramfs - Log df /boot around when we write and remove "bigfile" Signed-off-by: Colin Walters --- diff --git a/tests/kolainst/destructive/auto-prune.sh b/tests/kolainst/destructive/auto-prune.sh index 0dc4ef21..cd421dd1 100755 --- a/tests/kolainst/destructive/auto-prune.sh +++ b/tests/kolainst/destructive/auto-prune.sh @@ -40,15 +40,24 @@ assert_not_journal_grep() { fi } +modules_dir=usr/lib/modules/`uname -r` + block_size=$(stat --file-system /boot -c '%s') +kernel_size=$(stat -c '%s' ${modules_dir}/vmlinuz) +initramfs_size=$(stat -c '%s' ${modules_dir}/initramfs.img) +cat < rootfs/usr/lib/modules/`uname -r`/dtb/$i; done) +(set +x; for i in {1..${dtbcount}}; do echo -n x > rootfs/${modules_dir}/dtb/$i; done) ostree commit --base modkernel1 -P --tree=dir=rootfs -b modkernel3 # a naive estimator would think all those files just take 10000 bytes